<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>登陆</title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <script src="js/jquery-3.2.1.js"></script>
    <script src="js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
    <div class="starter-template">
        <h2>亲爱的召唤师请登录</h2>
        <form class="form-signin" action="/login" method="post">
            <p id="ifLogin" class="bg-info" th:text=${login}></p>
            <p th:if="${param.logout}" class="bg-warning">已注销</p>
            <p th:if="${param.error}" class="bg-danger">账号密码错误，请重试</p>
            <div class="form-group">
                <label for="username">账号</label>
                <input type="text" id="username" class="form-control" name="username" value="haha" placeholder="账号"/>
            </div>
            <div class="form-group">
                <label for="password">密码</label>
                <input type="password" id="password" value="111111" class="form-control" name="password"
                       placeholder="密码"/>
            </div>
            <input type="submit" id="login" value="登录" class="btn btn-primary"/>
            <input type="button" onclick="window.location.href='/toRegister'" value="注册" class="btn btn-info"/>
        </form>
    </div>
</div>
</body>
</html>